<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>21_position定位</title>
    <link rel="stylesheet" href="./css//basic.css" />
    <style>
      .container {
        width: 200px;
        height: 200px;
        background-color: pink;
        margin: 10px 10px;
        position: relative;
      }
      .item1,
      .item2,
      .item3,
      .item4,
      .item5 {
        width: 50px;
        height: 50px;
        background-color: orchid;
        position: absolute;
      }
      .item2 {
        background-color: aqua;
        right: 0;
      }
      .item3 {
        background-color: bisque;
        bottom: 0;
      }
      .item4 {
        background-color: blueviolet;
        bottom: 0;
        right: 0;
      }
      .item5 {
        background-color: orange;
        right: 50%;
        top: 50%;
        transform: translate(25px, -25px);
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="item1"></div>
      <div class="item2"></div>
      <div class="item3"></div>
      <div class="item4"></div>
      <div class="item5"></div>
    </div>
  </body>
</html>
